package cn.topcodes.tcsf.app.web.controller.api;

import cn.topcodes.tcsf.admin.commons.api.domain.ApiResponseEntity;
import cn.topcodes.tcsf.app.domain.form.AppAboutSettings;
import cn.topcodes.tcsf.app.service.impl.AppSettingsServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Unicorn
 * @date 2017/5/5
 */
@Api(tags = {"APP通用接口(其他)"})
@RestController
@RequestMapping(value = "/api/app/other", produces = "application/json")
public class OtherApi {

    @Autowired
    private AppSettingsServiceImpl appSettingsService;


    @ApiOperation("获取APP关于信息")
    @RequestMapping(value = "about",method = RequestMethod.GET)
    public ApiResponseEntity aboutApp() {
        AppAboutSettings appAboutSettings = appSettingsService.getAppAboutSettings();
        return ApiResponseEntity.buildOK().setBody(appAboutSettings);
    }

}
